-
Notifications
You must be signed in to change notification settings - Fork 531
feat: remove openshift/generic-admission-server #1263
feat: remove openshift/generic-admission-server #1263
Conversation
ac2a764
to
c3ddea2
Compare
This is getting somewhere, at least I got around the flag problem imposed by controller-runtime. Now it's mostly getting ready and health checks done as well as any additional flags that would be needed. |
ccfff87
to
8cb14a2
Compare
CI blocked by #1264 |
8cb14a2
to
98ff2a1
Compare
/retest error from kind |
@makkes: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
That library os not actively maintained, anymore, and (worse) blocks updating k8s dependencies to v0.18 and beyond because of breaking changes to client-go (context.Context pass to most of the public functions now). Therefore, I refactored the webhook to rely on controller-runtime. This also simplifies much of the webhook's code.
/assign @jimmidyson |
/ok-to-test |
/retest |
Manually restarted Travis build. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really great thank you! Some minor tweaks, but looking forward to getting this in!
@@ -94,7 +92,7 @@ spec: | |||
name: serving-cert | |||
readinessProbe: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about adding a liveness probe too to /healthz
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer not to introduce any additional bigger changes in this PR to have a clear path to track back possible issues that might be caused by these changes. Would you agree on me adding a livenessProbe in a subsequent PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that's fine.
cmd/webhook/app/webhook.go
Outdated
if err != nil { | ||
klog.Fatalf("error getting clientset: %s", err) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a healthz checker here too:
hookServer.WebhookMux.Handle("/helathz/", http.StripPrefix("/healthz", &healthz.Handler{}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see above. I'd like to tackle this in a subsequent PR to not dilute this one. 🙂
* clean up imports * use port 8443 by default for webhook, get rid of a constant * remove dead code * remove unnecessary Ping handler
98ff2a1
to
66a2e42
Compare
@jimmidyson sorry for the force-push, I rebased. Your comments have been addressed in 66a2e42. |
Thanks @makkes - love this PR! /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jimmidyson, makkes The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What this PR does / why we need it:
This PR removes the dependency on the now unmaintained github.com/openshift/generic-admission-server library by migrating the webhook server to sigs.k8s.io/controller-runtime.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):no issue
Special notes for your reviewer: